#!/bin/bash

cd $(dirname $0);
vir_name=$1
exsi_host=192.168.31.215

ssh -o StrictHostKeyChecking=no root@${exsi_host} " vim-cmd vmsvc/getallvms|grep ${vir_name}|awk '{printf\$1}'|xargs -i vim-cmd vmsvc/power.on {}" 

